import { Module } from 'vuex'
import { State } from '..'

type Todo = [string]

const init = {
    todos: [] as Todo[]
}

export type TodoInit = typeof init

export default {
    state: init,
    namespace: true,
    mutations: {
        init(state, data) {
            state.todos = data
        }
    }
} as Module<TodoInit, State>